#include "Exception.hpp"

#include <boost/lexical_cast.hpp>
#define BOOST_FILESYSTEM_VERSION 3
#include <boost/filesystem.hpp>

using namespace std;
using namespace boost;

ShaderSource::ShaderSource(std::string Source)
{
	//add line numbers:
	m_Source='\n'+Source;

	size_t Pos=0;
	unsigned int i=1;
	while((Pos=m_Source.find("\n", Pos)) != string::npos)
	{
		m_Source.insert(++Pos, lexical_cast<string>(i)+": ");
		i++;
	}
}

Filename::Filename(string Filename)
{
	m_Filename=Filename;
	m_AbsFilename=lexical_cast<string>(filesystem::absolute(filesystem::path(Filename)));
}
